import { Card, message, Typography, } from 'antd';
import { history } from 'umi';
import { useRequest } from 'umi';
import type { FC } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import { queryArticleDetail } from './service';


const BasicForm: FC<Record<string, any>> = () => {

  const { Paragraph } = Typography;

  const { data, loading } = useRequest(() => {
    if (history.location.query.id) {
      return queryArticleDetail(history.location.query);
    }
  });

  console.log("-----------", data)
  return (
    <PageContainer content="">
      <Card bordered={false}>

        <div dangerouslySetInnerHTML={{ __html: data ? data.content : '' }}>

        </div>
      </Card>
    </PageContainer >
  );
};

export default BasicForm;
